package com.xiaoshuidi.cloud.module.contract.enums.bill;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum OwnerOrderStatusEnum {

    PENDING_PROCESSING(0,"待处理"),
    OVERDUE(1,"已逾期"),
    PROCESSED(2,"已处理"),
    CANCELED(3,"已取消"),
    PENDING_APPROVAL(4,"待审批"),
    REJECTED(5,"已驳回"),

    ;

    private final Integer code;
    private final String msg;

    public static String getName(Integer code) {
        for (OwnerOrderStatusEnum c : OwnerOrderStatusEnum.values()) {
            if (c.getCode().intValue() == code) {
                return c.msg;
            }
        }
        return null;
    }
}
